package com.accenture.adf.newcodington.module10.activity;

/**
 * Topic: Inheritance
 * 
 * Instructions:
 * 	Zoo class overrides the methods inherited from the interface RidesHosting
 * 	Zoo hosts High Thrill rides
 * 	The variable zooRide is used to represent different types of rides
 * 	The zooRide value is 1 if the ride is a Low Thrill ride for Children and 2 if the 
 *  ride is a High Thrill ride for teens and adults
 * 	The errors in the code code will recede once the code is complete
 */

public class Zoo implements RidesHosting { //TODO 1 - implement RidesHosting

	private int noOfAnimals=0;
	private String[] animalNames={""};
	// Safari class in composed in Zoo
	private Safari safari=null;
	private int zooRide=0;
	
	// TODO 2 - generate the setters and getters for the instance variables. 
	public int getNoOfAnimals() {
		return noOfAnimals;
	}

	public void setNoOfAnimals(int noOfAnimals) {
		this.noOfAnimals = noOfAnimals;
	}

	public String[] getAnimalNames() {
		return animalNames;
	}

	public void setAnimalNames(String[] animalNames) {
		this.animalNames = animalNames;
	}

	public Safari getSafari() {
		return safari;
	}

	public void setSafari(Safari safari) {
		this.safari = safari;
	}

	public int getZooRide() {
		return zooRide;
	}

	public void setZooRide(int zooRide) {
		this.zooRide = zooRide;
	}
	
	/* TODO 3 - override assignRideCategory() method by assigning the 
	 * 			high thrill value to the zooRide instance variable. 
	 * 			Hint: use the HIGH_THRILL constant defined in the RideHosting interface
	 */
	public void assignRideCategory() {
		zooRide=RidesHosting.HIGH_THRILL;
	}
	
	

	// TODO 4 - override the getRideDetails method
	public String getRideDetails() {
		// TODO 5 - create a string variable rideDetails and initialize it with null Value 
		String rideDetails=null;
		
		/* TODO 6 - check the value of zooRide,
		 * 			assign the string "Low Thrill Rides for Children" to rideDetails if the zooRide is a low thrill ride and
		 * 			assign the string "High Thrill Rides for Teens and Adults" to rideDetails if zooRide is a high thrill ride
		 */
		if(zooRide==1)
		{
			rideDetails="Low Thrill Rides for Children";
		}
		if(zooRide==2)
		{
			rideDetails="High Thrill Rides for Teens and Adults";
		}
		
		// TODO 7 - return the rideDetails
		return rideDetails;
		
	}	

}
